Telegram Group & Telegram Channel
👣 Как одной Go‑службе легко выдержать 200000 RPS на одной машине

В свежей статье Никиты Бурова разбирается практический кейс: без шардирования, без десятков реплик и без магии облака — всего за счёт правильных оптимизаций Go‑сервис на одном MacBook Pro M3 достигает 200000 запросов в секунду с медианным P50 < 1 мс. Вот главные приёмы:

1⃣ Сводим работу «горячего» пути к минимуму
- Статический преподготовленный фид — из памяти, без БД/API.
- Ноль аллокаций — никаких new/make в горячем пути.

2⃣ net/http → fasthttp
- Быстрее TCP, буферы, заголовки.
- ×8–10 прирост RPS.

3⃣ Pool объектов + явный сброс
- sync.Pool для структур.
- Отказ от defer.

4⃣ Tюнинг GOMAXPROCS + GOGC
- GOMAXPROCS= ядра.
- GOGC=200–300.

5⃣ Профилирование pprof benchstat

Результат: один инстанс держит 200000 RPS с P50 < 1мс и P99 < 2мс.

🔗 Полная статья: https://medium.com/@nikitaburov/how-to-easily-handle-200k-rps-with-golang-8b62967a01dd
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/golang_books/960
Create:
Last Update:

👣 Как одной Go‑службе легко выдержать 200000 RPS на одной машине

В свежей статье Никиты Бурова разбирается практический кейс: без шардирования, без десятков реплик и без магии облака — всего за счёт правильных оптимизаций Go‑сервис на одном MacBook Pro M3 достигает 200000 запросов в секунду с медианным P50 < 1 мс. Вот главные приёмы:

1⃣ Сводим работу «горячего» пути к минимуму
- Статический преподготовленный фид — из памяти, без БД/API.
- Ноль аллокаций — никаких new/make в горячем пути.

2⃣ net/http → fasthttp
- Быстрее TCP, буферы, заголовки.
- ×8–10 прирост RPS.

3⃣ Pool объектов + явный сброс
- sync.Pool для структур.
- Отказ от defer.

4⃣ Tюнинг GOMAXPROCS + GOGC
- GOMAXPROCS= ядра.
- GOGC=200–300.

5⃣ Профилирование pprof benchstat

Результат: один инстанс держит 200000 RPS с P50 < 1мс и P99 < 2мс.

🔗 Полная статья: https://medium.com/@nikitaburov/how-to-easily-handle-200k-rps-with-golang-8b62967a01dd

BY Golang Books




Share with your friend now:
tg-me.com/golang_books/960

View MORE
Open in Telegram


Golang Books Telegram | DID YOU KNOW?

Date: |

Find Channels On Telegram?

Telegram is an aspiring new messaging app that’s taking the world by storm. The app is free, fast, and claims to be one of the safest messengers around. It allows people to connect easily, without any boundaries.You can use channels on Telegram, which are similar to Facebook pages. If you’re wondering how to find channels on Telegram, you’re in the right place. Keep reading and you’ll find out how. Also, you’ll learn more about channels, creating channels yourself, and the difference between private and public Telegram channels.

Spiking bond yields driving sharp losses in tech stocks

A spike in interest rates since the start of the year has accelerated a rotation out of high-growth technology stocks and into value stocks poised to benefit from a reopening of the economy. The Nasdaq has fallen more than 10% over the past month as the Dow has soared to record highs, with a spike in the 10-year US Treasury yield acting as the main catalyst. It recently surged to a cycle high of more than 1.60% after starting the year below 1%. But according to Jim Paulsen, the Leuthold Group's chief investment strategist, rising interest rates do not represent a long-term threat to the stock market. Paulsen expects the 10-year yield to cross 2% by the end of the year. A spike in interest rates and its impact on the stock market depends on the economic backdrop, according to Paulsen. Rising interest rates amid a strengthening economy "may prove no challenge at all for stocks," Paulsen said.

Golang Books from de


Telegram Golang Books
FROM USA